<template>
  <el-breadcrumb class="path" separator="/">
    <el-breadcrumb-item :to="{ path: '/' }">首页</el-breadcrumb-item>
    <el-breadcrumb-item v-for="(item, index) in paths" :key="index">{{item}}</el-breadcrumb-item>
  </el-breadcrumb>
</template>

<script>
  import {mapState} from 'vuex'

  export default {
    name: 'index',

    computed: mapState({
      paths: state => state.folder.currentPath.paths
    })
  }
</script>

<style lang="scss" scoped>
  .path {
    width: 90%;
    /* float: left; */
    display: inline-block;
    /* text-align: center; */
    line-height: 45px;
    padding-left: 20px;
  }
</style>
